home *** CD-ROM | disk | FTP | other *** search
- Path: portal.gmu.edu!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c,comp.lang.c++,comp.edu
- Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
- Date: 11 Apr 96 11:20:00 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.829221600@rscernix>
- References: <JSA.96Feb16135027@organon.com> <4kb2j8$an0@solutions.solon.com> <4kbrt5$k3h@mulga.cs.mu.OZ.AU> <dewar.829012486@schonberg> <4kcpgkINNcku@keats.ugrad.cs.ubc.ca> <TYNOR.96Apr9105114@twratl.atlanta.twr.com> <4kgunm$o4o@gde.GDEsystems.COM>
- NNTP-Posting-Host: ues5.cern.ch
- Mime-Version: 1.0
- Content-Type: text/plain; charset=US-ASCII
- Content-Transfer-Encoding: 7bit
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <4kgunm$o4o@gde.GDEsystems.COM> Chet <kackman> writes:
-
- >If i = j depends on your unit of address. If i is assumed a longword then
- >
- > &i + 4 = &j is true
- > not
- > &i + 1 = &j
-
- No matter what type i and j are, &i + 1 == &j if they happen to be
- stored one after the other, without any gaps and i before j. Read the
- chapter about pointer arithmetic in your C book. Carefully, this time
- (that is, assuming it won't be the first time :-)
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-